package com.isoft.c2team3service2.controller;

import com.isoft.c2team3service2.bean.ResponseData;
import com.isoft.c2team3service2.service.MountingService;
import com.isoft.c2team3service2.util.RedisConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

@RestController
@RequestMapping("/mounting")
public class MountingController {
    @Autowired
    private MountingService mountingService;
    // 获取艺人访问的之前访问时间,返回对应的分钟
    @GetMapping("/viewed")
    public long mounting(String name) {
        return mountingService.mounting(name);
    }
}